package com.ayf.payment.game.api.utils;

import com.swwx.charm.commons.lang.utils.LogPortal;
import com.swwx.charm.commons.lang.utils.SysContent;

import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;

public class MapUtil {

    /**
     * 打印请求头报文内容
     * @param request
     */
    public static void printHeaderInfo(HttpServletRequest request) {
        Enumeration<String> enumeration = request.getHeaderNames();
        String traceId = SysContent.getClueNo();
        while (enumeration.hasMoreElements()) {
            String key = enumeration.nextElement();
            String value = request.getHeader(key);
            LogPortal.debug("no:{}, {}:{}",traceId, key, value);
        }
    }
}
